import React from 'react'
import { Link } from 'react-router-dom'
import { $pre } from '../../../../http/http'
import "../../Public.less"

const New = (props) => {
    let { newList } = props
    return (
        <div>
            <h2>新人专享</h2>
            <ul>
                {
                    newList.map(item => {
                        return (
                            <Link key={item.id} to={"/detail/"+item.id}>
                                <li>
                                    <img src={$pre + item.img} alt="" />
                                    <h3>{item.goodsname}</h3>
                                    <p>￥<span>{item.price}</span></p>
                                    <del>￥{item.market_price}</del>
                                </li>
                            </Link>
                        )
                    })
                }
            </ul>
        </div>
    )
}

export default New